// Copyright (C) 2024 Intel Corporation
// SPDX-License-Identifier: Apache-2.0

import "./App.scss"
import { useState } from "react"
import { MantineProvider } from "@mantine/core"
import '@mantine/notifications/styles.css';
import { SideNavbar, SidebarNavList } from "./components/sidebar/sidebar"
import { IconMessages, IconBrandLoom } from "@tabler/icons-react"
import Conversation from "./components/Conversation/Conversation"
import { Notifications } from '@mantine/notifications';

function App() {
  const [active, setActive] = useState(1)
  
  const navList: SidebarNavList = [
    { icon: IconMessages, label: "智能聊天", onClick: () => { setActive(1) }},
    { icon: IconBrandLoom, label: "图片生成", onClick: () => { setActive(2) }}
  ]
  
  return (
    <MantineProvider>
      <Notifications position="top-right" />
      <div className="layout-wrapper">
        <SideNavbar navList={navList} />
        {active == 1 && <div className="content"><Conversation title="智能聊天" /></div>}
      </div>
    </MantineProvider>
  )
}

export default App
